//
//  XCTabBarView.h
//  CreditAddressBook
//
//  Created by Lee on 15/4/22.
//  Copyright (c) 2015年 Lee. All rights reserved.
//

#import <UIKit/UIKit.h>

@class XCTabBarView;

typedef NS_ENUM(NSUInteger, LESelectedIndex) {
    LESelectedIndexFirst = 1,
    LESelectedIndexSecond,
    LESelectedIndexThird,
    LESelectedIndexFourth
};

@protocol XCTabBarDelegate <NSObject>

@optional
- (void)tabBar:(XCTabBarView *)tabBar didSelectButtonFrom:(NSInteger)from to:(NSInteger)to;

- (void)tabBar:(XCTabBarView *)tabBar buttonClicked:(UIButton *)sender;

@end

@interface XCTabBarView : UIView

@property (nonatomic, weak) id<XCTabBarDelegate> delegate;

/**
 *  设置选中的按钮
 */
@property (nonatomic ,assign) LESelectedIndex selectedIndex;

- (void)addTabBarButtonWithImageName:(NSString *)imageName andSelImageName:(NSString *)selImageName andTitle:(NSString *)title;

- (void)addTabBarButtonWithTitles:(NSArray *)titles andTitleColor:(UIColor *)color andselColor:(UIColor *)selColor andFont:(UIFont *)font;

- (void)setSelectedTabBarWithIndex:(NSInteger)index;
@end
